package com.my.xq.domain.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.sskj.core.entity.BaseEntity;


/**
 * 任务 <br/>
 * <p>
 * <a href="RenWu.java.html"><i>查看源文件</i></a>
 * </p>
 * 
 * @author lg
 * @version $Revision: $<br>
 *          $Id: $
 */
@Entity
@Table(name = "SYS_RenWu")
public class RenWu extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	/** 任务Code */
	@Column(length = 120)
	private String code;//单位长投票CAST01 //楼栋长投票CAST02 //委员投票CAST03 // 主任投票CAST04
	
	/** 任务名称 */
	@Column(length = 120)
	private String name;	
	
	/** 任务状态 */
	@Enumerated(EnumType.STRING)
	private RenWuDefine rw;	
	
	@Column(length = 40)
	private String courtId;	//对应的小区id
	
	@Column(name = "start_time")
	private Date startTime;	//开始时间
	
	@Column(name = "end_time")
	private Date endTime;	//结束时间	
	
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public boolean isOver() {
		return isOver;
	}

	public void setOver(boolean isOver) {
		this.isOver = isOver;
	}

	@Column
	private boolean isOver = false;	//是否结束		
	
	@Column
	private boolean isActive = false;	//是否启动
		
		
	public RenWu() {
		
	}	
	
	public RenWu(RenWuDefine rw,String courtId) {
		this.rw = rw;
		this.name = rw.getDesc();
		this.code = rw.name();
		this.courtId = courtId;		
	}	



	public String getCourtId() {
		return courtId;
	}

	public void setCourtId(String courtId) {
		this.courtId = courtId;
	}


	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public RenWuDefine getRw() {
		return rw;
	}

	public void setRw(RenWuDefine rw) {
		this.rw = rw;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}



}
